import { https } from '../utils/https'
import type { LoginResult } from '../types/login'
type loginParams = {
  code: string
  encryptedData: string
  iv: string
}
// 小程序登录
export const getLoginApi = (data: loginParams) => {
  return https<LoginResult>({
    method: 'POST',
    url: '/login/wxMin',
    data,
  })
}
// 模拟登陆
export const postLoginWxMinSimple = (phone: string) => {
  return https<LoginResult>({
    method: 'POST',
    url: '/login/wxMin/simple',
    data: {
      phoneNumber: phone,
    },
  })
}
